package 并发编程02.volatile关键字案例;

/**
 * @author 将这段代码进行汇编之后，查看一下多出来了什么内容
 */
public class LazySingleton {

    private static volatile LazySingleton instance = null;
    
    public static LazySingleton getInstance() {
        if (instance == null) {
            instance = new LazySingleton();
        }
        
        return instance;
    }
    
    public static void main(String[] args) {
        LazySingleton.getInstance();
    }
    
}